/*
 *                  BioJava development code
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  If you do not have a copy,
 * see:
 *
 *      http://www.gnu.org/copyleft/lesser.html
 *
 * Copyright for this code is held jointly by the individual
 * authors.  These should be listed in @author doc comments.
 *
 * For more information on the BioJava project and its aims,
 * or to join the biojava-l mailing list, visit the home page
 * at:
 *
 *      http://www.biojava.org/
 * 
 * Created on Jun 11, 2007
 * 
 */

package org.biojava.services.das.dao;

import java.net.URL;

public class ProjectBean {
	
	
	String name;
	URL iconURL;
	URL homepage;
	String description;	
	RegistryUser owner;
	int projectID;
	
	public ProjectBean() {		
	}
	
	public boolean equals(ProjectBean other){		
		if (this.name.equals(other.getName()))
			return true;
		return false;
	}
	
	public int hashCode(){
		int h = 7;
        
        h = 31 * h + ( null == name ? 0 : name.hashCode());
        return h;
	}
	
	public String toString(){
		return "ProjectBean: " + projectID + " " + name;
	}
	
	public int getProjectID() {
		return projectID;
	}

	public void setProjectID(int projectID) {
		this.projectID = projectID;
	}
	
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public URL getHomepage() {
		return homepage;
	}
	public void setHomepage(URL homepage) {
		this.homepage = homepage;
	}
	public String getIconURL() {
		String url = "ProjectIcon?id=" + projectID;
		 
		return url;
		
	}
	public void setIconURL(URL iconURL) {
		this.iconURL = iconURL;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public RegistryUser getOwner() {
		return owner;
	}
	public void setOwner(RegistryUser owner) {
		this.owner = owner;
	}
	
}
